extends ../../_layout/default.pug

block canonical
  link(rel='canonical' href='https://coreui.io/docs/components/spinners/')

block breadcrumb
  +breadcrumb(
    [
      { href: '#', label: 'Home'},
      { label: 'Components'},
      { label: 'Base'},
      'Spinners'
    ],
  )

block view
  +docs-components('https://coreui.io/docs/components/spinners/')
  .row
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Border
        .card-body
          p.text-body-secondary.small Use the border spinners for a lightweight loading indicator.
          +example('https://coreui.io/docs/components/spinners/#border-spinner')
            .spinner-border(role='status')
              span.visually-hidden Loading...
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Colors
        .card-body
          p.text-body-secondary.small
            | The border spinner uses 
            code currentColor
            |  for its 
            code border-color
            | , meaning you can customize the color with 
            a(href='https://coreui.io/docs/utilities/colors/') text color utilities
            | . You can use any of our text color utilities on the standard spinner.
          +example('https://coreui.io/docs/components/spinners/#colors')
            .spinner-border.text-primary(role='status')
              span.visually-hidden Loading...
            .spinner-border.text-body-secondary(role='status')
              span.visually-hidden Loading...
            .spinner-border.text-success(role='status')
              span.visually-hidden Loading...
            .spinner-border.text-danger(role='status')
              span.visually-hidden Loading...
            .spinner-border.text-warning(role='status')
              span.visually-hidden Loading...
            .spinner-border.text-info(role='status')
              span.visually-hidden Loading...
            .spinner-border.text-light(role='status')
              span.visually-hidden Loading...
            .spinner-border.text-dark(role='status')
              span.visually-hidden Loading...
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Growing
        .card-body
          p.text-body-secondary.small
            | If you don’t fancy a border spinner, switch to the grow spinner. While it doesn’t technically spin, it does repeatedly grow!
          +example('https://coreui.io/docs/components/spinners/#growing-spinner')
            .spinner-grow(role='status')
              span.visually-hidden Loading...
          p.text-body-secondary.small
            | Once again, this spinner is built with 
            code currentColor
            | , so you can easily change its appearance with 
            a(href='https://coreui.io/docs/utilities/colors/') text color utilities
            | . Here it is in blue, along with the supported variants.
          +example('https://coreui.io/docs/components/spinners/#growing-spinner')
            .spinner-grow.text-primary(role='status')
              span.visually-hidden Loading...
            .spinner-grow.text-body-secondary(role='status')
              span.visually-hidden Loading...
            .spinner-grow.text-success(role='status')
              span.visually-hidden Loading...
            .spinner-grow.text-danger(role='status')
              span.visually-hidden Loading...
            .spinner-grow.text-warning(role='status')
              span.visually-hidden Loading...
            .spinner-grow.text-info(role='status')
              span.visually-hidden Loading...
            .spinner-grow.text-light(role='status')
              span.visually-hidden Loading...
            .spinner-grow.text-dark(role='status')
              span.visually-hidden Loading...
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Alignment
        .card-body
          p.text-body-secondary.small
            | Spinners in Bootstrap are built with 
            code rem
            | s, 
            code currentColor
            | , and 
            code display: inline-flex
            | . This means they can easily be resized, recolored, and quickly aligned.
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Margin
        .card-body
          p.text-body-secondary.small
            | Use 
            a(href='https://coreui.io/docs/utilities/spacing/') margin utilities
            |  like 
            code .m-5
            |  for easy spacing.
          +example('https://coreui.io/docs/components/spinners/#alignment')
            .spinner-border.m-5(role='status')
              span.visually-hidden Loading...
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Placement
        .card-body
          p.text-body-secondary.small
            | Use 
            a(href='https://coreui.io/docs/utilities/flex/') flexbox utilities
            | , 
            a(href='https://coreui.io/docs/utilities/float/') float utilities
            | , or 
            a(href='https://coreui.io/docs/content/typography/') text alignment
            |  utilities to place spinners exactly where you need them in any situation.
          h4#flex
            | Flex
            a.anchorjs-link(aria-label='Anchor' data-anchorjs-icon='#' href='#flex' style='padding-left: 0.375em;')
          +example('https://coreui.io/docs/components/spinners/#flex')
            .d-flex.justify-content-center
              .spinner-border(role='status')
                span.visually-hidden Loading...
          +example('https://coreui.io/docs/components/spinners/#flex')
            .d-flex.align-items-center
              strong Loading...
              .spinner-border.ms-auto(role='status' aria-hidden='true')
          h4#floats
            | Floats
            a.anchorjs-link(aria-label='Anchor' data-anchorjs-icon='#' href='#floats' style='padding-left: 0.375em;')
          +example('https://coreui.io/docs/components/spinners/#floats')
            .clearfix
              .spinner-border.float-end(role='status')
                span.visually-hidden Loading...
          h4#text-align
            | Text align
            a.anchorjs-link(aria-label='Anchor' data-anchorjs-icon='#' href='#text-align' style='padding-left: 0.375em;')
          +example('https://coreui.io/docs/components/spinners/#text-align')
            .text-center
              .spinner-border(role='status')
                span.visually-hidden Loading...
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Size
        .card-body
          p.text-body-secondary.small
            | Add 
            code .spinner-border-sm
            |  and 
            code .spinner-grow-sm
            |  to make a smaller spinner that can quickly be used within other components.
          +example('https://coreui.io/docs/components/spinners/#size')
            .spinner-border.spinner-border-sm(role='status')
              span.visually-hidden Loading...
            .spinner-grow.spinner-grow-sm(role='status')
              span.visually-hidden Loading...
          p.text-body-secondary.small Or, use custom CSS or inline styles to change the dimensions as needed.
          +example('https://coreui.io/docs/components/spinners/#size')
            .spinner-border(style='width: 3rem; height: 3rem;' role='status')
              span.visually-hidden Loading...
            .spinner-grow(style='width: 3rem; height: 3rem;' role='status')
              span.visually-hidden Loading...
    .col-12
      .card.mb-4
        .card-header
          strong Spinner
          span.small.ms-1 Buttons
        .card-body
          p.text-body-secondary.small
            | Use spinners within buttons to indicate an action is currently processing or taking place. You may also swap the text out of the spinner element and utilize button text as needed.
          +example('https://coreui.io/docs/components/spinners/#buttons')
            button.btn.btn-primary(type='button' disabled='')
              span.spinner-border.spinner-border-sm(role='status' aria-hidden='true')
              span.visually-hidden Loading...
            button.btn.btn-primary(type='button' disabled='')
              span.spinner-border.spinner-border-sm(role='status' aria-hidden='true')
              | Loading...
          +example('https://coreui.io/docs/components/spinners/#buttons')
            button.btn.btn-primary(type='button' disabled='')
              span.spinner-grow.spinner-grow-sm(role='status' aria-hidden='true')
              span.visually-hidden Loading...
            button.btn.btn-primary(type='button' disabled='')
              span.spinner-grow.spinner-grow-sm(role='status' aria-hidden='true')
              | Loading...
